<template>
    <div class="preview">
        <div class="title">数据预览</div>
        <div class="data">{{list}}</div>
    </div>
</template>

<script>
export default {
    name: "preview",
    props: {
        data:{
            type:Array,
            default(){
                return []
            }
        }
    },
    data() {
        return {
            
        };
    },
    computed: {
        list(){
            return JSON.stringify(this.data)
        }
    },
    methods: {}
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.preview{
    margin-top: 15px;
    width: 100%;

    .title{
        height: 30px;
        line-height: 30px;
        font-weight: bold;
    }

    .data{
        box-sizing: border-box;
        padding: 20px;
        width: 100%;
        min-height: 200px;
        max-height: 300px;
        background: #aaa;
        overflow: scroll;
    }
}
</style>
